import { defHttp } from '/@/utils/http/axios';
import { IPostProfileUpdateRequest } from '/@/types/system/senior/user/profile/update';
import {
  IPostProfileAvatarRequest,
  IPostProfileAvatarResponse,
} from '/@/types/system/senior/user/profile/avatar';
import { IGetProfileGetResponse } from '/@/types/system/senior/user/profile/get';
import { IPostProfilePasswordRequest } from '/@/types/system/senior/user/profile/password';

/**
 * 修改个人信息
 */
export const apiPostProfileUpdate = (params: IPostProfileUpdateRequest) =>
  defHttp.post({ url: `/system/senior/user/profile/update`, params });
/**
 * 修改个人头像
 */
export const apiPostProfileAvatar = (params: IPostProfileAvatarRequest) =>
  defHttp.post<IPostProfileAvatarResponse>({ url: `/system/senior/user/profile/avatar`, params });
/**
 * 获取个人信息
 */
export const apiProfileGet = () =>
  defHttp.get<IGetProfileGetResponse>({ url: `/system/senior/user/profile/get` });
/**
 * 重置个人密码
 */
export const apiPostProfilePassword = (params: IPostProfilePasswordRequest) =>
  defHttp.post({ url: `/system/senior/user/profile/password`, params });
